When an application opens a queue, the application is given a handle through which the application can access the queue. The presence of an open handle can inhibit certain operations. For example, it is not possible to purge a WebSphere MQ queue (WebSphere® and MQ are trade marks of International Business Machines Corporation of Armonk N.Y.) while a handle is open against that queue. Applications which open queues are typically responsible for closing those queues in a timely manner in order to keep the system functioning normally. For example, when an application has a handle open against a queue, then more of the queue (for example an index) may be stored or cached in memory.
It is common for existing resource managers to follow one of two patterns with respect to requests that conflict with a pre-existing open handle on an object: (1) To fail the conflicting request (this is the most common implementation); or (2) To allow the conflicting request to complete and to redirect the existing handle to a null object (for example, /dev/null). For example, a UNIX file handle (UNIX is a trade mark of The Open Group) represents an open file and when the file can be deleted while the file is open, no notification of the deletion is given to the application.
In another example, on Windows Operating System (Windows is a trade mark of Microsoft Corporation), an application opening a file can select whether the file is locked against deletion at open time (via the FILE_SHARE_DELETE option), however again no indication is given to the owner of the file handle when the file is deleted while the file is open.